-
Notifications
You must be signed in to change notification settings - Fork 898
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change dialog import to only use auto_refresh if new triggers are blank #17363
Change dialog import to only use auto_refresh if new triggers are blank #17363
Conversation
@eclarizio can you 👀 for me please? |
@miq-bot add_label bug |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code changes look good overall, can you adjust the specs so that there is one for the path when the new_associations
are blank and we do still need to build the old associations and one for the path where the new_associations
are sufficient?
association_list = (associations_to_be_created + old_associations).reject(&:blank?) | ||
build_associations(new_or_existing_dialog, association_list) | ||
association_list = new_associations.reject(&:blank?).present? ? new_associations : build_old_association_list(new_or_existing_dialog.dialog_fields).flatten | ||
binding.pry |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You might not want this here anymore :)
72a8755
to
9e1af4d
Compare
…e nonexistent. If using a new dialog, the DialogFieldAssociations should be what we're using
9e1af4d
to
b1650e5
Compare
Checked commit d-m-u@b1650e5 with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 LGTM, thanks!
…o_not_use_old_if_new_exist_on_dialog Change dialog import to only use auto_refresh if new triggers are blank (cherry picked from commit f8e4a47) Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1573254
Gaprindashvili backport details:
|
The old field associations still exist and are used to create the dialog associations on import. Because you can't touch the auto_refresh in the UI anymore but they still live in db and exist when we export dialogs. So if we have new associations we should use them and only them, not both the old associations and the new ones.
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1572777